﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyLib;
using System.Configuration;

namespace WebRole1
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblApplicationName.Text = clsStatic.getAppSettingsString("ApplicationName", "Azure Diagnostic");
                lblVersion.Text = clsStatic.getAppSettingsString("Version", "xx.xx");
            }

            if (!clsStorageAccount.StaticIsAccountValid())
            {
                btnExit.Visible = false;
            }
        }

        protected void btnExit_Click(object sender, EventArgs e)
        {
            clsStorageAccount.SetExpired();

            Response.Redirect("Default.aspx");
        }
    }
}
